#pragma once

#include "Graphic.h"

#include <sstream>

#include <Windowsx.h>

#include <stdio.h>

class Window {
public:
	Window(INT width, INT height);
	~Window();

	BOOL Messages();

	Graphic& Gfx();

private:
	VOID RegisterNewClass();
	VOID CreateNewWindow();

	static LRESULT CALLBACK HandleMsgSetup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
	static LRESULT CALLBACK HandleMsgThunk(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;
	LRESULT HandleMsg(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) noexcept;

private:
	INT _width;
	INT _height;
	CHAR ClassName[128];
	CHAR WindowName[128];
	HINSTANCE _hInstance;
	HWND _hWnd;
	std::unique_ptr<Graphic> gfx;
};

